import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      component: resolve => require(['../components/common/Home.vue'], resolve),
      meta: { title: '自述文件' },
      children:[
        {
          path: '/freightForward',
          component: resolve => require(['../components/page/table/FreightForward.vue'], resolve),
          meta: { title: '货代信息' },
        },
        {
          path: '/channel',
          component: resolve => require(['../components/page/table/ChannelTable.vue'], resolve),
          meta: { title: '渠道信息' },
        },
        {
          path: '/warehouse',
          component: resolve => require(['../components/page/table/Warehouse.vue'], resolve),
          meta: { title: '仓库信息' },
        },
        {
          path: '/calculate',
          component: resolve => require(['../components/page/table/Calculate.vue'], resolve),
          meta: { title: '仓库信息' },
        },
      ]
    },
    {
      path: '/404',
      component: resolve => require(['../components/page/404.vue'], resolve)
    }
  ],
  model:history
})
